<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
	<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> 
<div class="row">
	<div class="col-xs-12">
		<div class="box">
			<div class="box-header">
				<div class="box-name">
					<i class="fa fa-usd"></i> <span>收件箱</span>
				</div>
				<div class="box-icons">
					<a class="collapse-link"> <i class="fa fa-chevron-up"></i>
					</a> <a class="expand-link"> <i class="fa fa-expand"></i>
					</a> <a class="close-link"> <i class="fa fa-times"></i>
					</a>
				</div>
				<div class="no-move"></div>
			</div>
			<div class="box-content no-padding">
				<table
					class="table table-bordered table-striped table-hover table-heading table-datatable"
					id="datatable-1">
					<thead>
						<tr>
							<th>序号</th>
							<th>标题</th>
							<th>发送者</th>
							<th>发送时间</th>
							<th>重要程度</th>
			
							<th>操作</th>
						</tr>
					</thead>
					<tbody>
						<!-- Start: list_row -->
						<% int s=0; %>
						<c:forEach var="message" items="${messagelist}">
						<%s++; %>
						<tr>
							<td><%=s %></td>
							<td>${message.title}</td>
							<td>
							<c:forEach var="emp" items="${employee }">
							<c:if test="${message.creatorId==emp.id}">${emp.name}</c:if>
							</c:forEach>
							</td>
							<td>${message.sendTime}</td>
							<td><c:if test="${message.level==1}">普通</c:if>
							<c:if test="${message.level==2 }">重要</c:if>
							<c:if test="${message.level==3}">紧急</c:if>
							</td>					
						<td><a href="#" class="btn btn-default">详情</a></td>
						</tr>
						</c:forEach>
						
						<!-- End: list_row -->
					</tbody>
				</table>
			</div>
		</div>
	</div>
</div>
<script type="text/javascript">
// Run Datables plugin and create 3 variants of settings
function AllTables(){
	TestTable1();
	TestTable2();
	TestTable3();
	LoadSelect2Script(MakeSelect2);
}
function MakeSelect2(){
	$('select').select2();
	$('.dataTables_filter').each(function(){
		$(this).find('label input[type=text]').attr('placeholder', 'Search');
	});
}
$(document).ready(function() {
	// Load Datatables and run plugin on tables 
	LoadDataTablesScripts(AllTables);
	// Add Drag-n-Drop feature
	WinMove();
});
</script>